Skip to content

fix: avoid direct typescript import#254

Open
p7gg wants to merge 1 commit intorocicorp:mainfrom
p7gg:main
Open

fix: avoid direct typescript import#254
p7gg wants to merge 1 commit intorocicorp:mainfrom
p7gg:main

Conversation

@p7gg
Copy link

@p7gg p7gg commented Mar 4, 2026

Summary

  • route TypeScript type formatting through ts-morph's ts export to avoid ESM exports errors with npm alias installs
  • remove the only direct typescript import so native-preview aliases resolve cleanly

Motivation

  • npm alias installs like npm:@typescript/native-preview@latest do not export typescript from the package root, which triggers ERR_PACKAGE_PATH_NOT_EXPORTED when drizzle-zero imports it directly
  • using ts-morph's ts export keeps behavior identical while supporting TypeScript's native preview alias

Testing

  • pnpm test
  • local tarball packed via npm pack and installed with Bun in local repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant